package org.xuan.dubbo.provider.two.service;

import org.springframework.stereotype.Component;
import org.xuan.dubbo.api.entity.User;
import org.xuan.dubbo.api.service.TestService;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.alibaba.dubbo.config.annotation.Service; 
@Component
@Service(version = "1.0.0",timeout = 3000,group="ydq")
public class TestServiceImpl implements TestService{
 

	public String deal_sayhello(String p1, String p2, BlockException exception){
        return "************************deal_testHotKey2";
    }
	    
	@Override
	
	public String sayHello(String str) {
		// TODO Auto-generated method stub
		int i=0;
		if(str.equals("one")) { 
			try {
	            Thread.sleep(1500); //添加这个和不添加这个的影响
	        } catch (InterruptedException e) {
	            e.printStackTrace();
	        }
		    i=i/1;
		     i=0/i;
		}
		System.out.println("hello");
		if(1==1)this.sayHello2(str);
		
		return "hello";
	}

	@Override 
	public String sayHello2(String str) {
		System.out.println("hello2");
		// TODO Auto-generated method stub
		return "hello2";
	}

	@Override
	public User findUser() {
		// TODO Auto-generated method stub
		return null;
	}
 
   
}
